Skip to content

Feat: replace # typedpython: parallel comment with @compiled(parallel=True) (#358) - #359

Merged
b-re-w merged 1 commit into
developfrom
feat/typedpython-compiled-parallel
Oct 31, 2026
Merged

b-re-w merged 1 commit into
developfrom
feat/typedpython-compiled-parallel

Conversation

@b-re-w

@b-re-w b-re-w commented Oct 31, 2026 •

Copy link
Copy Markdown
Member

Closes #358

Summary

  • Replace the # typedpython: parallel comment marker with @compiled(parallel=True) (SPEC N-15, L-8, docs/design/typedpython-parallel-loops.md Decision 5).
  • Remove PARALLEL_MARKER and _parallel_marked from typedpython/frontend.py and parse @compiled(parallel=True|False) in _targets and is_opted_in.
  • Update builtins.compiled (.pth, embedded Python3.kt, __main__.py, conftest.py, __builtins__.pyi) to accept both compiled(f) and compiled(**opts)(f) (including fastmath: bool = ... in the stub for TypedPython: per-function fastmath opt-in (@compiled(fastmath=True)), not CPython-identical #332).
  • Convert test_parallel_loops.py and add tests in test_builtin_compiled.py, test_frontend.py and BuiltinCompiledTest.kt.

Verification

  • pytest src/test/python/test_builtin_compiled.py src/test/python/test_frontend.py -q: 102 passed, 3 skipped
  • pytest src/test/python/test_parallel_loops.py -q -m 'not measurement and not race_mutant': 152 passed
  • ./gradlew :python-multiplatform:desktopTest --tests python.multiplatform.ffi.BuiltinCompiledTest --rerun: 2 passed
  • pytest -q -m 'not measurement and not race_mutant': 1691 passed, 4 skipped

@b-re-w
b-re-w merged commit cf96f26 into develop Oct 31, 2026
@b-re-w
b-re-w deleted the feat/typedpython-compiled-parallel branch October 31, 2026 14:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant